home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 37
/
Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso
/
Aminet
/
comm
/
mail
/
AEMail230.lha
/
aemail230
/
arexx
/
placegrp.aem
< prev
next >
Wrap
Text File
|
1999-02-27
|
1KB
|
55 lines
/* AEMail Add Name Variable to Address Book Group */
OPTIONS RESULTS
/* TRACE ALL */
GETVAR
emailaddr = RESULT
IF (POS('@', emailaddr, 1) = 0) THEN DO
OKAY1 "No email address given"
EXIT
END
OK = 0
DO UNTIL OK = 1
ADDRESS_BOOK LIST GROUP DESCRIPTION LF
grplist = RESULT
GETLISTITEM "'"grplist"' 'Select the Group Wanted'"
grpname = RESULT
IF (grpname = "") THEN EXIT
PARSE VAR grpname grpname dflt
dflt = STRIP(dflt, 'L')
ADDRESS_BOOK GET grpname TYPE
addrtype = RESULT
IF (addrtype = -1) THEN DO
OKAY2 '"Create It|Enter New Name|Cancel"' "Group Nickname Does Not Exist"
IF (RESULT = 1) THEN DO
GETSTRING '"Enter a Group Description"' "'"dflt"'"
grpdesc = RESULT
OK = 1
OKAY2 "YES|NO" "Do you want to send header only?"
IF (RESULT = 0) THEN sndho = ""
ELSE sndho = "SHO"
END
ELSE IF (RESULT = 2) THEN OK = 0
ELSE IF (RESULT = 0) THEN exit
END
IF (addrtype = 0) THEN DO
OKAY2 '"Re-enter Name|Cancel"' "Nickname is already used for an Individual"
IF (RESULT = 1) THEN OK = 0
IF (RESULT = 0) THEN exit
END
IF (addrtype = 1) THEN OK = 1
END
IF (addrtype = -1) THEN DO
cmd = "ADDRESS_BOOK CREATE GROUP " grpname sndho "'"emailaddr"'" grpdesc
addrtype = 1
END
ELSE cmd = "ADDRESS_BOOK ADD TO GROUP " grpname "'"emailaddr"'"
cmd